﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Diagnostics;

namespace Netcare.Web
{
    /// <summary>
    /// Summary description for Host
    /// </summary>
    [WebService(Namespace = "http://www.wicresoft.com/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Host : System.Web.Services.WebService
    {

        //[WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }


        [WebMethod]
        public ProcessInfo[] GetProcesses()
        {
            throw new NotSupportedException();
        }


        [WebMethod]
        public void KillProcess(int pid)
        {
            throw new NotSupportedException();
        }


        [WebMethod]
        public SystemInfo GetSystemInfo()
        {
            throw new NotSupportedException();
        }



        [WebMethod]
        public string GetAgentInfo()
        {
            throw new NotSupportedException();
        }

        [WebMethod]
        public bool RestartService(string SerivceName)
        {
            throw new NotSupportedException();
        }

        [WebMethod]
        public void RestartOS()
        {
            throw new NotSupportedException();
        }

        [WebMethod]
        public int MemoryRelease(int Commend)
        {
            throw new NotSupportedException();
        }

        [WebMethod]
        public ReturnValue DiskRelease(RunType Commend)
        {
            throw new NotSupportedException();
        }

        [WebMethod]
        public ServiceInfo[] EnumServices()
        {
            throw new NotSupportedException();
        }
    }

    [Serializable]
    public class ProcessInfo
    {
        public int ProcessId { get; set; }
        public string ImageName { get; set; }
        public string FullPath { get; set; }

        public long VirtualMemorySize64 { get; set; }
        public long PrivateMemorySize64 { get; set; }
        public long PeakVirtualMemorySize64 { get; set; }
        public long PeakPagedMemorySize64 { get; set; }
        public long PagedMemorySize64 { get; set; }
        public long NonpagedSystemMemorySize64 { get; set; }
    }


    [Serializable]
    public enum ReturnValue
    {
        WRONG = 0,
        RUNNING = 1,
        FREE = 2
    };

    [Serializable]
    public enum RunType
    {
        Run = 0,
        Check = 1,
    };
}
